<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        #app {
            padding-bottom: 40px;
        }


        /* 头部 */
        .header {
            background-color: rgb(84, 179, 238);
            width: 100%;
            height: 100px;
            color: whitesmoke;
            font-size: 24px;
            padding: 15px 15px 0;
            box-sizing: border-box;
        }

        .header p {
            padding-left: 8px;
            margin-bottom: 5px;
        }

        .header>input {
            text-align: center;
            width: 100%;
            height: 36px;
            outline: none;
            border: none;
            background-color: #f5f5f5;
            border-radius: 20px;
        }

        .body {
            margin: 10px;
        }

        /* 大图片 */
        .img {
            margin: 10px 0;
        }

        .img>img {
            height: 100px;
            width: 100%;
        }

        /* 猜你喜欢 */

        .lbtn {
            margin: 5px 0;
            width: 100%;
            box-sizing: border-box;
            display: flex;
            justify-content: space-around;
            text-align: center;
            line-height: 40px;
        }

        .lbtn div.act {
            width: 25%;
            font-weight: bold;
        }

        /* 年货热卖 */
        .body .remai {
            display: flex;
            text-align: center;
            margin: 5px 0;
        }

        .body .remai span {
            display: inline-block;
            background-color: #f5f5f5;
            margin-left: 4px;
            width: 25%;
        }

        /* 店铺 */
        .body .dian {
            display: flex;
            margin: 15px;
        }

        .body img {
            height: 100px;
        }

        .body .dian .xinxi {
            margin-left: 5px;
        }

        .body .dian .xinxi .dainname {
            font-weight: bold;
            margin-bottom: 4px;
        }

        .body .dian .xinxi .ping {
            font-size: 12px;
            margin: 6px 0;
            margin-right: 4px;
            color: #999;
        }

        /* 月售 */
        .body .dian .xinxi .yue {
            font-size: 12px;
            margin: 6px 0;
            color: #999;
        }

        /* 多少钱起送 */
        .body .dian .xinxi .song {
            font-size: 12px;
            margin: 6px 0;
            color: #999;
        }

        /* 评论 */
        .body .dian .xinxi .pl {
            font-size: 12px;
            margin: 6px 0;
            color: orange;
            background-color: rgb(226, 210, 181);
            margin-right: 4px;
            border-radius: 4px;
        }

        /* 满减劵 */
        .body .dian .xinxi .jian {
            font-size: 12px;
            margin: 6px 0;
            color: red;
            border: 1px solid red;
            display: inline-block;
            background-color: rgb(239, 211, 230);
            margin-right: 5px;
        }



        /* 底部样式 */
        .tabbar {
            position: fixed;
            bottom: 0;
            width: 100%;
            padding: 10px;
            border-top: 1px solid #ccc;
            box-sizing: border-box;
            display: flex;
            justify-content: space-around;
            text-align: center;
            line-height: 40px;
            background-color: white;
        }

        .tabbar div.active {
            color: blue;
        }
    </style>
</head>

<body>
    <div id="app">
        <!-- 头部搜索框 -->
        <div class="header">
            <p>饿了么</p>
            <input type="text" placeholder="输入商家、商品名称">
        </div>

        <div class="body">

            <!-- 大图片 -->
            <div class="img">
                <img src="lbt.jpg" alt="">
            </div>

            <!-- 猜你喜欢 -->
            <div class="love">
                <h3>猜你喜欢</h3>
                <div class="lbtn">
                    <div :class="{act:lindex == index}" @click="lClick(index),sort(index)" class="paixu"
                        v-for="(item,index) in list1">
                        <div class="paixuname">{{item.name}}</div>
                    </div>
                </div>
            </div>

            <!-- 年货热卖 -->
            <div class="remai">
                <span v-for="(item,index) in arr">{{item}}</span>
            </div>

            <!-- 店铺 -->
            <div class="dian" v-for="(item,index) in list2">
                <img :src="item.pic" alt="">
                <div class="xinxi">
                    <div class="dainname">{{item.name}}</div>
                    <span class="ping">{{item.pf}}</span><span class="yue">月售{{item.shou}}</span><br>
                    <span class="song">起送￥{{item.sprice}}</span><br>
                    <span class="pl" v-for="(item,index) in item.pl">{{item}}</span><br>
                    <div class="jian" v-for="(item,index) in item.jian">{{item}}</div>
                </div>
            </div>

            <!-- 底部高亮 -->
            <div class="tabbar">
                <div :class="{active:cIndex == index}" @click="handleClick(index)" class="btn"
                    v-for="(item,index) in list">
                    <div class="name">{{item.name}}</div>
                </div>

            </div>
        </div>
    </div>
</body>

</html>
<script src="vue-2.5.21.js"></script>
<script src="饿了么.js"></script>